home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swaga_c.zip / CURSOR.SWG / 0001_Cursor SIZE-COLOR.pas next >
Pascal/Delphi Source File  |  1993-05-28  |  728b  |  47 lines

  1. {> And how can I hide my cursor ? I know it's something With INT 10 but
  2. > that's all I know...
  3.  
  4. Try this:
  5. SType 'C' or 'M' - Color or monchrome display
  6. Size 'S' or 'B' or 'O' cursor small, big, or none (invisible)
  7. }
  8. Uses Dos;
  9.  
  10. Procedure CursorSize(SType, Size : Char);
  11.  
  12. Var
  13.   Regs : Registers;
  14.   i : Integer;
  15.  
  16. begin
  17.   Size := UpCase(Size);
  18.   if UpCase(SType) = 'M' then
  19.     i := 6
  20.   ELSE
  21.    i := 0;
  22.  
  23. Regs.AH := $01;
  24. CASE Size of
  25. 'O' :
  26.   begin
  27.    Regs.CH := $20;
  28.    Regs.CL := $20;
  29.   end;
  30. 'B' :
  31.   begin
  32.    Regs.CH := $0;
  33.    Regs.CL := $7 + i;
  34.   end;
  35. 'S' :
  36.   begin
  37.    Regs.CH := $6+i;
  38.    Regs.CL := $7+i;
  39.   end;
  40. end;
  41. Intr($10, Regs);
  42. end;
  43.  
  44. begin
  45.   CursorSize('C','B');
  46.   readln;
  47. end.